# Hello and welcome to my i3-gaps configuration file!

# Fuck the new code of conduct! SJWs belong in the hell flames! Coraline must DIE!

# https://notabug.org/sabactani

set $mod Mod4
set $mod1 Mod1
set $TERMINAL st


font pango:xos4 Terminus 10 

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec $TERMINAL

# kill focused window
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run -p 'run:' -i -fn "xos4 Terminus:size=10" -nb '#282828' -nf '#ebdbb2' -sb '#458588' -sf '#282828'

# audio bindings

bindsym $mod+shift+v exec chvol 
bindsym XF86AudioRaiseVolume "exec pactl set-sink-volume @DEFAULT_SINK@ +1%"
bindsym XF86AudioLowerVolume "exec pactl set-sink-volume @DEFAULT_SINK@ -1%"
bindsym XF86AudioMute        "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"

# MPD bindings
bindsym XF86AudioPause "exec mpc toggle"
bindsym XF86AudioNext  "exec mpc next"
bindsym XF86AudioPrev  "exec mpc prev"
bindsym XF86AudioStop  "exec mpv stop"

# window settings
for_window [class="^.*"] border pixel 3

#gruvbox colors
client.focused          $blue $blue $darkgray $purple $gray
client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray
client.unfocused        $darkgray $darkgray $yellow $purple $darkgray
client.urgent           $red $red $white $red $red

client.background #ffffff
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+$mod1+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child

# print your screen
# https://github.com/naelstrof/maim 
#prints entire screen and moves to clipboard
bindsym Print exec "maim -u | xclip -selection clipboard -t image/png"
#select an area on your screen and copy the selection to the clipboard
bindsym --release Shift+Print exec "maim -u -s | xclip -selection clipboard -t image/png"
#print entire screen and save it on $HOME
bindsym --release Ctrl+Print exec "maim -u $HOME/$(date +%s).png"
#select an area on your screen and copy the selection to the clipboard
bindsym --release Ctrl+Shift+Print exec "maim -u -s $HOME/$(date +%s).png" 

set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10

# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'I seen fucking eunuchs with more balls than you.' -b 'Yes, exit i3' 'i3-msg exit'"
# lock the computer
bindsym $mod+Shift+Return exec "blurlock"

#gruvbox colors
set $bg #282828
set $red #cc241d
set $green #98971a
set $yellow #d79921
set $blue #458588
set $purple #b16286
set $aqua #689d68
set $gray #a89984
set $darkgray #1d2021

# start lemonbar
exec --no-startup-id lemon 

# autostart
exec --no-startup-id setxkbmap br -variant abnt2
exec --no-startup-id xrandr --dpi 115
exec --no-startup-id feh --bg-scale $HOME/wallpaper/bik.png
exec --no-startup-id xset +fp $HOME/.local/share/fonts
exec --no-startup-id mpdas
exec_always xrdb $HOME/.Xresources

# gaps
gaps outer 5 
gaps inner 10
smart_gaps on
